<?php

namespace Common\Model;

/**
 * UserFeedModel.class实例模型
 * 
 * @author songanwei
 * @date 2016-1-22
 */
class UserFeedModel extends BaseModel {

    protected $trueTableName = 'tb_user_feed';

    protected function _before_insert(&$data, $options) {
        // parent::_before_insert($data, $options);
    }

    /**
     * 添加反馈内容
     * @modify songanwei 2016-01-22
     * @param integer $userId  用户ID
     * @param string $feed  反馈内容
     * @param string $email  邮箱
     * @return type
     */
    public function addInfo($userId, $feed, $email = '') {
        $options = array(
            'userlogin_id' => $userId,
            'feed' => $feed,
            'email' => $email
        );
        return $this->add($options);
    }

}
